package com.key.org.service.serviceImp;

import com.key.base.service.serviceImp.BaseServiceImp;
import com.key.org.dao.IPostDao;
import com.key.org.model.Post;
import com.key.org.service.IPostService;

public class PostServiceImp extends BaseServiceImp implements IPostService {
	IPostDao postDao;

	public IPostDao getPostDao() {
		return postDao;
	}

	public void setPostDao(IPostDao postDao) {
		this.postDao = postDao;
	}

	/**
	 * model
	 * 
	 * @param post
	 */
	@Override
	public void add(Post post) throws Exception {
		try {
			postDao.add(post);
		} catch (Exception e) {
			e.printStackTrace();
			throw e;
		}
	}

	/**
	 * model
	 * 
	 * @param person
	 */
	@Override
	public void update(Post post) throws Exception {
		try {
			postDao.update(post);
		} catch (Exception e) {
			throw e;
		}
	}
}
